//
//  HXDGuessTableViewCell.m
//  qingDaoCircleOfLife
//
//  Created by huxuedong on 15/11/26.
//  Copyright © 2015年 huxuedong. All rights reserved.
//

#import "HXDGuessTableViewCell.h"

@interface HXDGuessTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *iconImage;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *introLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;

@end

@implementation HXDGuessTableViewCell

+ (instancetype)guessTableViewCell {
    return [[NSBundle mainBundle] loadNibNamed:@"HXDGuessTableViewCell" owner:nil options:nil].lastObject;
}

- (void)setGuessData:(NSDictionary *)guessData {
    _guessData = guessData;
    self.titleLabel.text = [self.guessData objectForKey:@"guessTitle"];
    self.introLabel.text = [self.guessData objectForKey:@"guessIntro"];
    NSString *priceStr = [NSString stringWithFormat:@"人均:￥%@元",[self.guessData objectForKey:@"guessPrice"]];
    self.priceLabel.text = priceStr;
    UIImage *icomImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[self.guessData objectForKey:@"guessCover"]]]];
    self.iconImage.image = icomImage;
}

@end
